#input: the result of G_l.m

function printMatInfo(f)
 file_id = fopen('mydata.txt', 'w');
 H=convertToSu2(1/sqrt(2)*[1 1;1 -1]);
 T=[exp(-1i*pi/8) 0;0 exp(1i*pi/8)];
 v=[1/3 1/4 1/6];
 
 for j = 1:length(f)
  U=eye(2);
  cell=f{j};
  for k =1:length(f{j})
   U=U*cell{k};
   if(cell{k}==H)
    fprintf(file_id,"H");
   endif
   if(cell{k}==T)
    fprintf(file_id,"T");
   endif
   if(cell{k}==H')
    fprintf(file_id,"H'");
   endif
   if(cell{k}==T')
    fprintf(file_id,"T'");
   endif
  endfor
  vect=getMainVector(U);
  fprintf(file_id,",%f,%f,%f,%f,%f\n",vect(1),vect(2),vect(3),distance(U,eye(2)),distance(U,u_rot(v)));
 endfor
 fclose(file_id);
endfunction
